Some methods of analysing a liquid sample involve capturing images of the sample whilst the sample is flowing. Characteristics of the sample can then be determined based on the captured images. In order to accurately determine these characteristics, it is desirable to focus the imaging device on the sample and, in particular, where appropriate, the component of the sample which is of interest. For example, if the sample is a blood sample, it may be desirable to focus the imaging device on blood cells or platelets in particular.
One approach to obtaining images of the sample which are in focus is to carry out a focusing algorithm in order to focus the imaging device on the sample once the sample has started flowing. However, this typically takes dozens of seconds or even minutes.